<div class="elevator-info">
  <nz-collapseset>
    <nz-collapse [nzTitle]="'查询'" [nzActive]="true">
      <form nz-form [nzLayout]="'inline'">
        <!--<div nz-form-item nz-col [nzSpan]="6">
          <div nz-form-label nz-col [nzSm]="9" [nzXs]="6">
            <label>是否合格</label>
          </div>
          <div nz-form-control>
            <nz-select style="width: 150px;" nzAllowClear [nzPlaceHolder]="'请选择'" [(ngModel)]="hydpressHalfMonBean.status"
              [nzShowSearch]="true" name="status">
              <nz-option [nzLabel]="'没问题'" [nzValue]="0"> </nz-option>
              <nz-option [nzLabel]="'有问题'" [nzValue]="1">
              </nz-option>
            </nz-select>
          </div>
        </div>-->
        <div nz-form-item nz-col [nzSpan]="6" [nzOffset]="'1'">
          <div nz-form-label nz-col [nzSm]="9" [nzXs]="6">
            <label>类型</label>
          </div>
          <div nz-form-control>
            <nz-select style="width: 150px;" nzAllowClear [nzPlaceHolder]="'请选择'" [(ngModel)]="hydpressHalfMonBean.type"
              name="type">
              <nz-option *ngFor="let option of types" [nzLabel]="option.partyName" [nzValue]="option.id">
              </nz-option>
            </nz-select>
          </div>
        </div>
        <button nz-button [nzSize]="'large'" [nzType]="'primary'" (click)="query()">查询</button>
      </form>
    </nz-collapse>
  </nz-collapseset>
  <nz-table #nzTable [nzDataSource]="list" nzSize="middle" [nzBordered]="true" [nzIsPagination]="false" (nzDataChange)="displayDataChange()">
    <thead nz-thead>
      <tr>
        <th nz-th>
          <span>开始日期</span>
        </th>
        <th nz-th>
          <span>维结束日期</span>
        </th>
        <th nz-th>
          <span>耗时(分钟)</span>
        </th>

        <th nz-th>
          <span>维保签名1</span>
        </th>
        <th nz-th>
          <span>维保签名2</span>
        </th>
        <!-- <th nz-th><span>维保人员2签名</span></th> -->
        <th nz-th>
          <span>安全管理员签名</span>
        </th>
        <th nz-th>
          <span>安全管理员签名时间</span>
        </th>
        <th nz-th>
          <span>维保类型</span>
        </th>
        <th nz-th>
          <span>详细</span>
        </th>
        <th nz-th>
          <span>导出</span>
        </th>
      </tr>
    </thead>
    <tbody nz-tbody>
      <tr nz-tbody-tr *ngFor="let data of list">
        <td nz-td>{{data.maintenanceStartDate | timeTrans}}</td>
        <td nz-td>{{data.maintenanceEndDate | timeTrans}}</td>
        <td nz-td>{{data.maintenancenUsedTime}}</td>

        <td nz-td>
          <img *ngIf="data.maintenanceUserSignId1!=null" src="{{data.maintenanceUserSignId1}}" width="80px" height="40px" />
        </td>
        <td nz-td>
          <img *ngIf="data.maintenanceUserSignId2!=null" src="{{data.maintenanceUserSignId2}}" width="80px" height="40px" />
        </td>
        <td nz-td>
          <img *ngIf="data.safeUserSignId2!=null" src="{{data.safeUserSignId2}}" width="80px" height="40px" />
        </td>
        <td nz-td>{{data.safeUserSignTime | timeTrans}}</td>
        <td nz-td>{{data.type | constantTransfer:maintTypes}}</td>
        <td nz-td>
          <span>
            <button nz-button [nzSize]="'small'" [nzType]="'primary'" (click)="toDetail(title, content, footer,data)">查看</button>
          </span>
        </td>
        <td nz-td>
          <span>
            <button nz-button [nzSize]="'small'" [nzType]="'primary'" (click)="export(data)">导出</button>
          </span>
        </td>
      </tr>
    </tbody>
  </nz-table>
  <nz-pagination [nzPageIndex]="hydpressHalfMonBean.currentPage" nzShowTotal [nzTotal]="total" nzShowSizeChanger
    (nzPageSizeChange)="nzPageSizeChange($event)" (nzPageIndexChange)="nzPageIndexChange($event)"
    (nzPageIndexClickChange)="nzPageIndexClickChange($event)" [nzPageSize]="hydpressHalfMonBean.pageSize"></nz-pagination>
</div>

<ng-template #title>
  <span>{{modelTitle}}</span>
</ng-template>
<ng-template #content>
  <p>
    维保总结：
  </p>
  <div>
    {{hydpressHalfMon.summary}}
  </div>
  <p>
    总拍照片数：{{totalImg}}
  </p>
  <!-- <nz-tabset [nzShowPagination]="true"  [nzTabPosition]="'top'"> -->
  <div class="headtab">
    <span (click)="doActive(1)" [ngClass]="{'active':isActive==1}" *ngIf="type >= 1">
      <a>第一项</a>
    </span>
    <span (click)="doActive(2)" [ngClass]="{'active':isActive==2}" *ngIf="type >= 2">
      <a>第二项</a>
    </span>
    <span (click)="doActive(3)" [ngClass]="{'active':isActive==3}" *ngIf="type >= 3">
      <a>第三项</a>
    </span>
    <span (click)="doActive(4)" [ngClass]="{'active':isActive==4}" *ngIf="type >= 4">
      <a>第四项</a>
    </span>
  </div>
  <hydpress-half-mon *ngIf="isActive==1" [inValue]="hydpressHalfMon"></hydpress-half-mon>
  <hydpress-quarter *ngIf="isActive==2" [inValue]="hydpressQuarter"></hydpress-quarter>
  <hydpress-half-year *ngIf="isActive==3" [inValue]="hydpressHalfYear"></hydpress-half-year>
  <hydpress-year *ngIf="isActive==4" [inValue]="hydpressYear"></hydpress-year>
  <!-- </nz-tabset> -->

</ng-template>
<ng-template #footer>
  <div>
  </div>
</ng-template>
